package com.dhecp.project.finance.service.impl;

import com.dhecp.core.constant.DataFiltering;
import com.dhecp.project.common.service.impl.BaseModuleServiceImpl;
import com.dhecp.project.finance.domain.TcwCapitalRegisterClaim;
import com.dhecp.project.finance.mapper.*;
import com.dhecp.project.finance.service.TcwCapitalRegisterClaimService;
import com.dhecp.project.system.service.SysDictionaryForFieldService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;

/**
 * 资金登记认领表实现类
 *
 */
@Service
public class TcwCapitalRegisterClaimServiceImpl extends BaseModuleServiceImpl implements TcwCapitalRegisterClaimService {
    @Autowired
    private TcwCapitalRegisterClaimMapper tcwCapitalRegisterClaimMapper;
    
    @Autowired
    private SysDictionaryForFieldService dictionaryForFieldService;



    /**
     * 通过guid查询单条数据
     *
     * @param params 对象
     * @return 实例对象

    @Override
    public TcwCapitalRegister queryFirstRecord(Map<String, Object> params) throws Exception{
        params.put(DataFiltering.TABLE_ALIAS, "t1");	//查询表别名
        params.put(DataFiltering.DATA_SCODE, dictionaryForFieldService.getDataScode(params));	//数据权限查询条件SQL语句
        return tcwCapitalRegisterClaimMapper.selectFirstRecordByNid(params);
    } */



    /**
    * 查询列表数据
    */
    @Override
    public List<TcwCapitalRegisterClaim> queryList(Map<String, Object> params) throws Exception{
        params.put(DataFiltering.TABLE_ALIAS, "t1");	//查询表别名
        params.put(DataFiltering.DATA_WHERE, dictionaryForFieldService.getWhereStr(params));	//常规查询条件SQL语句
        params.put(DataFiltering.DATA_SCODE, dictionaryForFieldService.getDataScode(params));	//数据权限查询条件SQL语句
        return tcwCapitalRegisterClaimMapper.select(params);
    }



    /**
     * 认领表单弹出框的资金登记认领表信息查询
     */
    @Override
    public List<TcwCapitalRegisterClaim> findInfoListByCapitalSelectModel(Map<String, Object> params) throws Exception{
        params.put(DataFiltering.TABLE_ALIAS, "t1");	//查询表别名
        //params.put(DataFiltering.DATA_WHERE, dictionaryForFieldService.getWhereStr(params));	//常规查询条件SQL语句
        //params.put(DataFiltering.DATA_SCODE, dictionaryForFieldService.getDataScode(params));	//数据权限查询条件SQL语句
        return tcwCapitalRegisterClaimMapper.findInfoListByCapitalSelectModel(params);
    }


}

